package com.objcat.playground.cxymsjd;

import java.util.ArrayList;
import java.util.List;

/**
 * @author objcat
 * @version 1.0
 * @description Solution1
 * @date 2023/11/10 10:14
 */
public class Solution1 extends BaseSolution {
    static {
        Solution1 solution = new Solution1();
        solution.start();
    }

    @Override
    public void code() {
//        String str = "qwertyuiopasdfghjklzxcvbnm";
        String str = "sdfjklsdfjkldsjflkswioeusdfdsfjlksf";
        char[] charArray = str.toCharArray();
        List<Object> objects = new ArrayList<>();
        Boolean isHave = false;
        for (char s : charArray) {
            if (!objects.contains(s)) {
                objects.add(s);
            } else {
                isHave = true;
                break;
            }
        }
        System.out.println(isHave);
    }
}
